package org.extremengine.shape;

import org.extremengine.common.Point;
import org.extremengine.common.Vertex;

public class Polygon extends Shape {

	private Vertex[] vertexes;

	public Polygon(Vertex[] vertexes) {
		super();
		this.vertexes = vertexes;
	}

	public static Polygon wrap(Shape shape) {
		throw new UnsupportedOperationException();
	}

	@Override
	public Point getBarycenter() {
		throw new UnsupportedOperationException();
	}

	@Override
	public void transform(double deltax, double deltay) {
		for (int i = 0; i < vertexes.length; i++) {
			Vertex v = vertexes[i];
			v.setX(v.x + deltax);
			v.setY(v.y + deltay);
		}
	}

	public Vertex[] getVertexes() {
		return vertexes;
	}

	public void setVertexes(Vertex[] vertexes) {
		this.vertexes = vertexes;
	}

	@Override
	public Shape clone() {
		throw new UnsupportedOperationException();
	}
}
